{extend name="base" /}


{block name="main"}
<div class="container" id="app">
    <div class="row justify-content-center">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">edit hotel</div>

                <div class="card-body">
                    <form method="POST" action="{:url('admin/postUser')}">

                        <input type="hidden" name="id" value="{$model.id}">

                        <div class="form-group row">
                            <label class="col-md-4 col-form-label text-md-right">First name</label>
                            <div class="col-md-6">
                                <input type="text" class="form-control" v-model="model.first_name" name="first_name" required autofocus>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-4 col-form-label text-md-right">Last name</label>
                            <div class="col-md-6">
                                <input type="text" class="form-control" v-model="model.last_name" name="last_name" required>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-4 col-form-label text-md-right">Email</label>
                            <div class="col-md-6">
                                <input type="email" class="form-control" v-model="model.email" name="email" required>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-4 col-form-label text-md-right">Country</label>
                            <div class="col-md-6">
                                <input type="text" class="form-control" v-model="model.country" name="country" required>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-4 col-form-label text-md-right">Birthday</label>
                            <div class="col-md-6">
                                <input type="date" class="form-control" v-model="model.birthday" name="birthday" required>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-4 col-form-label text-md-right">Gender</label>
                            <div class="col-md-6">
                                <div class="form-check">
                                    <input class="form-check-input" type="radio" v-model="model.gender" name="gender" value="0" checked>
                                    <label class="form-check-label">
                                        female
                                    </label>
                                </div>
                                <div class="form-check">
                                    <input class="form-check-input" type="radio" v-model="model.gender" name="gender" value="1" checked>
                                    <label class="form-check-label">
                                        male
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-4 col-form-label text-md-right">Level</label>
                            <div class="col-md-6">
                                <div class="form-check">
                                    <input class="form-check-input" type="radio" v-model="model.level" name="level" value="0" checked>
                                    <label class="form-check-label">
                                        level0
                                    </label>
                                </div>
                                <div class="form-check">
                                    <input class="form-check-input" type="radio" v-model="model.level" name="level" value="1" checked>
                                    <label class="form-check-label">
                                        level1
                                    </label>
                                </div>
                            </div>
                        </div>


                        <div class="form-group row mb-0">
                            <div class="col-md-6 offset-md-4">
                                <button type="submit" class="btn btn-primary">
                                    Update
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name='js'}
<script type="text/javascript">
    let app = new Vue({
        el: '#app',
        methods: {

        },
        mounted: function () {

        },
        data:{
            model: {:json_encode($model)}
    }
    });
</script>
{/block}